#include<iostream>
#include<deque>

using namespace std;

void printDeque1(deque<int>& d){

	for(deque<int>::iterator iter=d.begin(); iter!=d.end(); iter++){
		cout<<*iter<<" ";
	}
	cout<<endl;
}

void printDeque2(deque<int>& d){
	for(int i=0;i<d.size();i++){
		cout<<d[i]<<" ";
	}
	cout<<endl;
}

int main(){
	deque<int> d;
	cout<<"d.empty():"<<d.empty()<<endl;
	cout<<"d.size:"<<d.size()<<endl;
	
	d.assign({1,2,3});
	cout<<"d.empty():"<<d.empty()<<endl;
        cout<<"d.size:"<<d.size()<<endl;
	printDeque2(d);

	d.resize(18);
	cout<<"d.size():"<<d.size()<<endl;
	printDeque2(d);

	d.resize(20,6);
        cout<<"d.size():"<<d.size()<<endl;
        printDeque2(d);

	d.resize(100000);
	d.resize(5);
	cout<<"d.size():"<<d.size()<<endl;
	printDeque2(d);
	return 0;
}
